<template>
  <div class="box">
    <el-form :model="form" label-width="120px">
      <el-form-item label="角色名称">
        <el-input v-model="form.roleName" />
      </el-form-item>
      <el-form-item label="角色说明">
        <el-input v-model="form.roleComment" type="textarea" />
      </el-form-item>
    </el-form>
    <el-form-item class="btn-box">
      <el-button @click="onSubmit" type="success">保存</el-button>
      <router-link to="/home/role">
        <el-button style="margin-left: 20px" type="info"
          >返回</el-button
        ></router-link
      >
    </el-form-item>
  </div>
</template>

<script lang="ts" setup>
import { ref, reactive } from "vue";

let num = Number(10);
const form = reactive({
  id: num,
  roleName: "",
  roleComment: "",
  createTime: "",
});
// form.roleName = item.roleName;
// form.roleComment = item.roleComment;
const onSubmit = () => {
  console.log("submit!");
};
</script>

<style>
a {
  text-decoration: none;
}
.box {
  width: 500px;
  margin: 20px 0;
}
.btn-box {
  margin-left: 70%;
}
</style>
